package com.bilibili.service;

import java.util.Date;
import java.util.List;

import com.bilibili.entity.Follow;
import com.bilibili.entity.Page;
import com.bilibili.entity.Video;

public interface VideoService {
	boolean insertVideo(Video video);

	int selectAllViewByUid(int uploaderId);

	List<Video> selectByAll(int uploaderId);

	Video selectVideoById(int videoId);

	List<Video> selectVideosByIds(List<Integer> videoIds);

	int selectViewByUidAndDate(int uploaderId, Date nowDate);

	Video getVideoById(int videoId);

	boolean deleteMyAttention(Follow follow);

	boolean deleteVideosByVideoId(int user_id, int allVideoId);

	boolean insertMyAttention(Follow follow);

	/**
	 * 查询所有视频
	 * 
	 * @return 视频对象集合
	 */
	Page<Video> selectAllVideo(Video v, int pageNum, int pageSize);

	/**
	 * 查询所有未审核的视频
	 * 
	 * @return 未审核视频的总数
	 */
	int selectNotExamineVideoNum();

	/**
	 * 修改视频状态
	 * 
	 * @param v video对象
	 * @return 影响行数
	 */
	boolean updateVideostate(Video v);

	/**
	 * 查询所有视频的总数
	 * 
	 * @return 视频的总数
	 */
	int selectAllVideoNum();
	
	boolean updateVideoStateByVideoId(int state,int videoId);

}